Health Cloud Administration System API - Implementation Template
Developer guide
Administration Dev Guide
The US-Core Administratoin application uses the following DataWeave modules to map between Health Cloud and FHIR formats.
Module | Description |
---|---|
PatientFHIRTools | PatientFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
PatientRequest | This module defines functions needed to convert a FHIR Patient resource into it's representation within Health Cloud. |
LocationFHIRTools | LocationFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
LocationRequest | This module defines functions needed to convert a FHIR Location resource into it's representation within Health Cloud. |
PractitionerFHIRTools | PractitionerFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
PractitionerRequest | This module defines functions needed to convert a FHIR Practitioner resource into it's representation within Health Cloud. |
OrganizationFHIRTools | OrganizationFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
OrganizationRequest | This module defines functions needed to convert a FHIR Organization resource into it's representation within Health Cloud. |
encounterfhirtools | encounterFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
encounterRequest | This module defines functions needed to convert a FHIR Encounter resource into it's representation within Health Cloud. |
PractitionerRoleFHIRTools | PractitionerRoleFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
PractitionerRoleRequest | This module defines functions needed to convert a FHIR PractitionerRole resource into it's representation within Health Cloud. |
RelatedPersonFHIRTools | RelatedPersonFHIRTools dataweave library contains functions used for converting Health Cloud data into FHIR format. |
RelatedPersonRequest | This module defines functions needed to convert a FHIR RelatedPerson resource into it's representation within Health Cloud. |
Util | A library with needed dataweave utility functions. |
PatientFHIRTools
PatientFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Patient/PatientFHIRTools.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getPatientResponse (acc: Object, idTypeIdList, personNames, contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap, languageCodeSetCodes, generalPractitionerIds, maritalStatusCodeSetCodes)
Generates the FHIR response with the provided Account and contact Accounts.
param
acc
is the Account object to map.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
parampersonNames
is an optional array of HC PersonName objects to map.
paramcontactAccounts
is an optional array of contact Account objects to map.
paramcontactPersonNames
is a list of contact PersonName objects.
paramcontactContactRelations
is a list of contact relation objects.
paramrelationRoleMap
the role relationship map.
paramlanguageCodeSetCodes
the CodeSet lookup
return A FHIR formatted Patient object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Account | Id | Patient account Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
active | Account | IsActive | Whether this patient's record is in active use |
name.family | PersonName | LastName | Patient last name |
name.given | PersonName | FirstName | Patient first name |
name.suffix | PersonName | Suffix | Parts that come after the name |
name.prefix | PersonName | Prefix | Parts that come before the name |
gender | Contact | Gender | The gender of the patient |
birthDate | Contact | Birthdate | The date of birth of the patient |
deceasedDateTime | Contact | DeceasedDate | Indicates if the individual is deceased or not |
maritalStatus | Contact | maritalStatus | Marital (civil) status of a patient |
multipleBirthInteger | Contact | SequenceInMultipleBirth | The number is the birth number in the sequence |
telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
address.use | ContactPointAddresses | UsageType | The use of an address |
address.type | ContactPointAddresses | AddressType | The type of an address (physical \ postal) |
address.line | ContactPointAddresses | Street | Patient's address Line |
address.city | ContactPointAddresses | City | Patient's address city |
address.state | ContactPointAddresses | State | Patient's address state |
address.postalCode | ContactPointAddresses | PostalCode | Patient's address postal code |
address.country | ContactPointAddresses | Country | Patient's address country |
communication.language.coding.display | PersonLanguage | Language | Language display |
contact.name.family | PersonName | LastName | The last name of the contact party for the patient |
contact.name.given | PersonName | FirstName | The first name of the contact party for the patient |
contact.name.suffix | PersonName | Suffix | Parts that come after the contact party's name |
contact.name.prefix | PersonName | Prefix | Parts that come before the contact party's name |
contact.name.use | PersonName | NameUsageType | The use of a human name. |
contact.gender | Contact | Gender | The gender of the contact party |
contact.relationship.coding.code | HealthCloudGA__ContactContactRelation__c | HealthCloudGA__Role__c | The nature of the relationship between a patient and a contact person for that patient. |
contact.telecom.system | ContactPointEmail | Telecommunications form for contact point. | |
contact.telecom.value | ContactPointEmail | EmailAddress | Contact party's email address |
contact.telecom.use | ContactPointEmail | UsageType | The use of an email address |
contact.telecom.rank | ContactPointEmail | PreferenceRank | Specify preferred order of use |
contact.telecom.period.start | ContactPointEmail | ActiveFromDate | Starting time with inclusive boundary |
contact.telecom.period.end | ContactPointEmail | ActiveToDate | End time with inclusive boundary |
contact.telecom.system | ContactPointPhone | Telecommunications form for contact point. | |
contact.telecom.value | ContactPointPhone | TelephoneNumber | Contact party's phone number |
contact.telecom.use | ContactPointPhone | UsageType | Purpose of this contact point |
contact.telecom.rank | ContactPointPhone | PreferenceRank | Specify preferred order of use |
contact.telecom.period.start | ContactPointPhone | ActiveFromDate | Starting time with inclusive boundary |
contact.telecom.period.end | ContactPointPhone | ActiveToDate | End time with inclusive boundary |
contact.address.use | ContactPointAddress | UsageType | The use of the contact party's address |
contact.address.line | ContactPointAddress | Street | The type of the contact party's address |
contact.address.city | ContactPointAddress | City | Contact party's address city |
contact.address.state | ContactPointAddress | State | Contact party's address state |
contact.address.postalCode | ContactPointAddress | PostalCode | Contact party's address postal code |
contact.address.country | ContactPointAddress | Country | Contact party's address country |
contact.address.type | ContactPointAddress | AddressType | The type of an address |
us-core-race.extension:ombCategory..system | Contact | Race_Ext_OmbCategory_ValueCoding_Sys1__c | US Core Race Extension |
us-core-race.extension:ombCategory..code | Contact | Race_Ext_OmbCategory_ValueCoding_Code1__c | US Core Race Extension |
us-core-race.extension:ombCategory..display | Contact | Race_Ext_OmbCategory_ValueCoding_DP1__c | US Core Race Extension |
us-core-race.extension:ombCategory..system | Contact | Race_Ext_OmbCategory_ValueCoding_Sys2__c | US Core Race Extension |
us-core-race.extension:ombCategory..code | Contact | Race_Ext_OmbCategory_ValueCoding_Code2__c | US Core Race Extension |
us-core-race.extension:ombCategory..display | Contact | Race_Ext_OmbCategory_ValueCoding_DP2__c | US Core Race Extension |
us-core-race.extension:ombCategory..system | Contact | Race_Ext_OmbCategory_ValueCoding_Sys3__c | US Core Race Extension |
us-core-race.extension:ombCategory..code | Contact | Race_Ext_OmbCategory_ValueCoding_Code3__c | US Core Race Extension |
us-core-race.extension:ombCategory..display | Contact | Race_Ext_OmbCategory_ValueCoding_DP3__c | US Core Race Extension |
us-core-race.extension:detailed..system | Contact | Race_Ext_Detailed_ValueCoding_Sys1__c | US Core Race Extension |
us-core-race.extension:detailed..code | Contact | Race_Ext_Detailed_ValueCoding_Code1__c | US Core Race Extension |
us-core-race.extension:detailed..display | Contact | Race_Ext_Detailed_ValueCoding_DP1__c | US Core Race Extension |
us-core-race.extension:detailed..system | Contact | Race_Ext_Detailed_ValueCoding_Sys2__c | US Core Race Extension |
us-core-race.extension:detailed..code | Contact | Race_Ext_Detailed_ValueCoding_Code2__c | US Core Race Extension |
us-core-race.extension:detailed..display | Contact | Race_Ext_Detailed_ValueCoding_DP2__c | US Core Race Extension |
us-core-race.extension:text..valueString | Contact | Race_Ext_ValueString__c | US Core Race Extension |
us-core-ethnicity.extension:ombCategory..system | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Sys1__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..code | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Code1__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..display | Contact | Ethnic_Ext_OmbCategory_ValueCoding_DP1__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..system | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Sys2__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..code | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Code2__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..display | Contact | Ethnic_Ext_OmbCategory_ValueCoding_DP2__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..system | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Sys3__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..code | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Code3__c | US Core ethnicity Extension |
us-core-ethnicity.extension:ombCategory..display | Contact | Ethnic_Ext_OmbCategory_ValueCoding_DP3__c | US Core ethnicity Extension |
us-core-ethnicity.extension:detailed..system | Contact | Ethnic_Ext_Detailed_ValueCoding_Sys1__c | US Core ethnicity Extension |
us-core-ethnicity.extension:detailed..code | Contact | Ethnic_Ext_Detailed_ValueCoding_Code1__c | US Core ethnicity Extension |
us-core-ethnicity.extension:detailed..display | Contact | Ethnic_Ext_Detailed_ValueCoding_DP1__c | US Core ethnicity Extension |
us-core-ethnicity.extension:detailed..system | Contact | Ethnic_Ext_Detailed_ValueCoding_Sys2__c | US Core ethnicity Extension |
us-core-ethnicity.extension:detailed..code | Contact | Ethnic_Ext_Detailed_ValueCoding_Code2__c | US Core ethnicity Extension |
us-core-ethnicity.extension:detailed..display | Contact | Ethnic_Ext_Detailed_ValueCoding_DP2__c | US Core ethnicity Extension |
us-core-ethnicity.extension:text..valueString | Contact | Ethnic_Ext_ValueString__c | US Core ethnicity Extension |
us-core-birthsex.url | Contact | Birthsex_Ext_URL__c | US Core Birth Sex Extension |
us-core-birthsex.valueCode | Contact | Birthsex_Ext_ValueCode__c | US Core Birth Sex Extension |
generalPractitioner | ContactContactRelation__c | RelatedContact__c | Patient's nominated primary care provider |
fun getPatientNames (personNames)
Gets the patient names in FHIR format with the provided list of HC PersonName objects.
param
personNames
is a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getPatientCommunicationContactPoints (cp)
Gets the patient communication contact point object for the provided contact point provided.
param
cp
is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getPatientIdentifiers (idTypeIdList, ids)
Gets the patient identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeIdList
is a list of HC records to FHIR identifier type codes.
paramids
is an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getPatientAddresses (addresses)
Get the patient addresses form HC and returns an array of FHIR formatted Address objects.
param
addresses
is an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getPatientCommunication (personLanguages, languagelookup)
Get the patient preferred language from the provided HC account object and returns an array of FHIR formatted language objects.
param
personLanguages
is a list of Languages to map.
paramlanguagelookup
is a list of codeset lookup for Language to map.
return An array of FHIR formatted language objects.
fun getPatientContacts (contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap)
Gets the patient contact-contact relations as an array of FHIR objects.
param
contactAccounts
is an optional list of contact Account objects to map.
paramcontactPersonNames
is a list of contact PersonName objects.
paramcontactContactRelations
is a list of contact relation objects.
paramrelationRoleMap
the role relationship map.
return An array of contact FHIR objects.
fun getContactPeriod (contactContactRelations, id)
Gets the contact period object with the provided list of contact relations, the Id of the current account.
param
contactContactRelations
is a list of contact relation objects.
paramid
is a string with the account Id.
return A contact period object.
fun getPatientRelationRole (contactContactRelations, id, relationRoleMap)
Gets the patient relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.
param
contactContactRelations
is a list of contact relation objects.
paramid
is a string with the account Id.
paramrelationRoleMap
the role relationship map.
return A code for the patient relation role.
fun getPatientRelationRoleRecord (contactContactRelations, id)
Gets the patient relation role record with the provided list of contact relations and the Id.
param
contactContactRelations
is a list of contact relation objects.
paramid
is a string with the account Id.
return A Salesforce role Id for the provided data.
fun getPatientUsCoreExtensions (ct)
Gets the us-core Extensions for Patient with the provided Contact object.
param
ct
is a Health Cloud Contact object.
return A FHIR formatted extension list.
fun getPatientUsCoreExtensionRace (ct)
Gets the us-core Extension for Patient race with the provided Contact object.
param
ct
is a Health Cloud Contact object.
return A FHIR formatted race extension object.
fun getPatientUsCoreExtensionEthnicity (ct)
Gets the us-core Extension for Patient ethnicity with the provided Contact object.
param
ct
is a Health Cloud Contact object.
return A FHIR formatted ethnicity extension object.
fun getPatientUsCoreExtensionBirthSex (ct)
Gets the us-core Extension for Patient birth sex with the provided Contact object.
param
ct
is a Health Cloud Contact object.
return A FHIR formatted birth sex extension object.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
fun getGeneralPractitioner (contactAccounts, contactContactRelations, relationRoleMap, generalPractitionerIds)
Gets the generalPractitioner object with the provided list of contact relations, the Id of the current account.
param
contactAccounts
is a list of contact account objects.
paramcontactContactRelations
is a list of contact relation objects.
paramid
is a string with the account Id.
return A contact period object.
PatientRequest
This module defines functions needed to convert a
FHIR Patient resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Patient/PatientRequest.dwl
Functions
fun getPatientPersonAccount (fhirObj, recordType)
Converts the provided Patient FHIR object to the Health Cloud PersonAccount request object.
param
fhirObj
is a FHIR Patient object.
paramrecordType
is an ID with the PersonAccount record ID to use.
return A Health Cloud PersonAccount request object.
fun getPatientAccount (fhirObj)
Converts the provided Patient FHIR object to the Health Cloud Account object.
param
fhirObj
is a FHIR Patient object.
return A Health Cloud Account object.
fun getPatientContact (fhirObj, upsertLookupResponse)
Converts the provided Patient FHIR object to the Health Cloud Contact object.
param
fhirObj
is a FHIR Patient object.
return A Health Cloud Contact object.
fun getPatientPersonName (fhirObj, accountId)
Converts the provided Patient FHIR object to the Health Cloud PersonName object list.
param
fhirObj
is a FHIR Patient object.
paramaccountId
is a string with the Account Id.
return A Health Cloud PersonName object list.
fun getPatientContactPoint (telecom, accountId)
Converts the provided Patient FHIR object to the Health Cloud ContactPoint object list.
param
telecom
is a list of Patient telecom objects.
paramaccountId
is a string with the Account Id.
return A Health Cloud ContactPoint object list.
fun getPatientIdentifier (fhirObj, idTypeIdList, accountId)
Converts the provided Patient FHIR object to the Health Cloud Identifier object list.
param
fhirObj
is a FHIR Patient object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramaccountId
is a string with the Account Id.
return A Health Cloud Identifier object list.
fun getIdentifierType (identifierObj)
Gets the identifier type. It first looks for the codeable concept code value, and if that's not found it then looks for the text value.
param
identifierObj
is an identifier object to get the type for.
return A string with the type or Undefined.
fun getPatientContactPointAddress (fhirObj, accountId)
Converts the provided Patient FHIR object to the Health Cloud ContactPoint Address objectlist .
param
fhirObj
is a FHIR Patient object.
paramaccountId
is a string with the Account Id.
return A Health Cloud ContactPoint Address object list.
fun getPatientPersonLanguage (fhirObj, upsertLookupResponse)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObj
is a FHIR RelatedPerson object.
paramupsertLookupResponse
is a FHIR Codeset lookup object.
return A Health Cloud PersonLanguage object list.
fun getPatientPersonLanguage (fhirObj, upsertLookupResponse, accountId)
Converts the provided Patient FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObj
is a FHIR Patient object.
paramupsertLookupResponse
is a FHIR Codeset lookup object.
paramaccountId
is a string with the Account Id.
return A Health Cloud PersonLanguage object list.
fun getPatientExtensions (fhirObj)
Converts the provided Patient FHIR object and returns the patient ethnicity and race us-core extensions.
param
fhirObj
is a FHIR Patient object.
return The Health Cloud ethnicity and race fields for Contact object.
fun getPatientRace (ext)
Converts the provided FHIR Extension object and returns the patient race us-core extensions.
param
ext
is a us-core-race extension object.
return An object with the extension fields for HC Contact.
fun getPatientEthnicity (ext)
Converts the provided FHIR Extension object and returns the patient ethnicity us-core extensions.
param
ext
is a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.
fun getPatientBirthSex (ext)
Converts the provided FHIR Extension object and returns the patient birth sex us-core extension.
param
ext
is a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.
fun getPatientEthnicityOmbCategory (items)
Converts the provided FHIR Extension list of Ethnicity OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.
param
items
is a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientEthnicityDetailed (items)
Converts the provided FHIR Extension list of Ethnicity Detailed objects and returns a list of objects with the us-core extensions for HC Contact.
param
items
is a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientEthnicityText (items)
Converts the provided FHIR Extension list of Ethnicity Text objects and returns a list of objects with the us-core extensions for HC Contact.
param
items
is a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientRaceOmbCategory (items)
Converts the provided FHIR Extension list of Race OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.
param
items
is a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientRaceDetailed (items)
Converts the provided FHIR Extension list of Race Detailed objects and returns a list of objects with the us-core extensions for HC Contact.
param
items
is a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientRaceText (items)
Converts the provided FHIR Extension list of Race Text objects and returns a list of objects with the us-core extensions for HC Contact.
param
items
is a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientContactsPersonAccount (method, fhirObj, index, recordType)
Converts the provided Contact FHIR object to the Health Cloud Patient Contact Account request.
param
method
is a string with POST or PATCH.
paramfhirObj
is a FHIR Contact object.
paramindex
is a string with the contact reference index to use.
paramrecordType
is an ID with the PersonAccount record
return A composite Health Cloud contact Account request.
fun getPatientContactsContact (fhirObj, upsertLookupResponse)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts Contact.
param
fhirObj
is a FHIR Contact object.
return A composite Health Cloud contact Contact.
fun getPatientContactsPersonName (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts PersonName composite request.
param
method
is a string with POST or PATCH.
paramfhirObj
is a FHIR Contact object.
paramctIndex
is the index of the contact in the loop.
paramaccountId
is the Id of the parent Account record.
return A composite Health Cloud contact PersonName request.
fun getPatientContactsContactPointTelecom (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts telecom composite request.
param
method
is a string with POST or PATCH.
paramfhirObj
is a FHIR Contact object.
paramctIndex
is the index of the contact in the loop.
paramaccountId
is the Id of the parent Account record.
return A composite Health Cloud contact telecom request.
fun getPatientContactsContactPointAddress (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts address composite request.
param
method
is a string with POST or PATCH.
paramfhirObj
is a FHIR Contact object.
paramctIndex
is the index of the contact in the loop.
paramaccountId
is the Id of the parent Account record.
return A composite Health Cloud contact address request.
fun getPatientContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, patientContactContactId, ctIndex)
Converts the provided Contact FHIR object to the Health Cloud Patient contact-to-contact relationship of composite request.
param
method
is a string with POST or PATCH.
paramfhirObj
is a FHIR Contact object.
paramrelationRoleMap
the role relationship map.
parammainContactId
is a string with the main Contact Id.
paramcontactId
is a string with the Contact Id.
paramctIndex
is the index of the contact in the loop.
return A composite Health Cloud contact-to-contact relationship request.
fun getgeneralPractitionerContactsRelationships (method, relationRoleMap, mainContactId, contactId)
Converts the provided Contact FHIR object to the Health Cloud generalPractitioner contact-to-contact relationship of composite request.
param
method
is a string with POST or PATCH.
paramrelationRoleMap
the role relationship map.
parammainContactId
is a string with the main Contact Id.
paramcontactId
is a string with the Contact Id.
return A composite Health Cloud contact-to-contact relationship request.
LocationFHIRTools
LocationFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Location/LocationFHIRTools.dwl
Functions
fun getLocationResponse (loc: Object, locationObj, identifierObj, codeSet, idTypeIdList, parentFacilityAccountId, timeSlotsObject, locationTypeCodeSetObject, Id)
Generates the location response object in FHIR format with the provided location and associated objects queried from Health Cloud.
param
loc
is the HC Account location object.
paramlocationObj
is the HC Location object.
paramidentifierObj
is the HC Identifier object list.
paramcodeSet
is the HC CodeSet object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramparentFacilityAccountId
is a String with the parent facility Account Id if present or null if not provided.
paramlocationTypeCodeSetObject
is FHIR CodeSet object response.
return A FHIR formatted Location object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | HealthcareFacility | Id | Healthcare Facility Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
active | Account | IsActive | Whether this patient's record is in active use |
name | HealthcareFacility | Name | Name of the location as used by humans |
description | Location | Description | Additional details about the location that could be displayed as further information to identify the location beyond its name |
position.longitude | Location | Longitude | Longitude with WGS84 datum |
position.latitude | Location | Latitude | Latitude with WGS84 datum |
availabilityExceptions | HealthcareFacility | AvailabilityExceptions | Description of availability exceptions |
partOf | HealthcareFacility | ParentHealthcareFacilityId | Another Location this one is physically a part of |
type.coding.code | HealthcareFacility.FacilityTypeId | Code | Type of function performed |
type.coding.display | HealthcareFacility.FacilityTypeId | CodeDescription | Type of function performed |
type.coding.system | HealthcareFacility.FacilityTypeId | SourceSystem | Type of function performed |
physicalType.coding.display | HealthcareFacility | LocationType | |
telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
address.use | ContactPointAddresses | UsageType | The use of an address |
address.type | ContactPointAddresses | AddressType | The type of an address (physical\postal) |
address.line | ContactPointAddresses | Street | Patient's address Line |
address.city | ContactPointAddresses | City | Patient's address city |
address.state | ContactPointAddresses | State | Patient's address state |
address.postalCode | ContactPointAddresses | PostalCode | Patient's address postal code |
address.country | ContactPointAddresses | Country | Patient's address country |
managingOrganization | HealthCloudGA__RelatedFromAccounts__r | HealthCloudGA__RelatedAccount__c | Organization responsible for provisioning and upkeep |
hoursOfOperation.daysOfWeek | TimeSlot | DayOfWeek | The days of the week. |
hoursOfOperation.openingTime | TimeSlot | StartTime | Time that the Location opens |
hoursOfOperation.closingTime | TimeSlot | EndTime | Time that the Location closes |
fun getLocationHoursOfOperation (timeSlots)
Gets the HoursOfOperation object with the provided TimeSlots object.
param
timeSlots
is a Health Cloud TimeSlots object.
return A FHIR Location physicalType object.
fun getLocationType (codeSet)
Gets the Location type object with the provided codeSet Health Cloud object.
param
codeSet
is a Health Cloud CodeSet object.
return A FHIR Location type object.
fun getLocationPhysicalType (locationTypeCodeSet)
Gets the Location physicalType object with the provided HealthcareFacility Health Cloud object.
param
facility
is a Health Cloud HealthcareFacility object.
return A FHIR Location physicalType object.
fun getLocationIdentifier (idList, idTypeIdList)
Gets the Location identifier object list with the provided Identifier Health Cloud object list.
param
idList
is a Health Cloud Identifier object list.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A FHIR Location identifier object.
fun getLoationTelecom (loc: Object)
Gets the Location telecom objects with the provided Location Health Cloud object.
param
loc
is the HC Account location object.
return A list of FHIR Location telecom objects.
fun getLoationAddress (loc: Object)
Gets the Location address objects with the provided Location Health Cloud object.
param
loc
is the HC Account location object.
return A list of FHIR Location address objects.
fun getLoationManagingOrganization (loc: Object)
Gets the Location managing organization object with the provided Location Health Cloud object.
param
loc
is the HC Account location object.
return A FHIR reference to managing organization.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
LocationRequest
This module defines functions needed to convert a
FHIR Location resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Location/LocationRequest.dwl
Functions
fun getLocationAccount (fhirObj, operatingHoursId)
Converts the provided Location FHIR object to the Health Cloud Account object.
param
fhirObj
is a FHIR Location object.
return A Health Cloud Account object.
fun getLocationLocation (fhirObj)
Converts the provided Location FHIR object to the Health Cloud Location object.
param
fhirObj
is a FHIR Location object. Id or null if not present.
return A Health Cloud Location object.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Location upsert.
param
req
is a FHIR object field.
paramlookupReq
is from FHIR_CodeSet__c.
return A value for the picklist field.
fun getLocationHealthcareFacility (fhirObj, facilityTypeId, upsertLookupResponse)
Converts the provided Location FHIR object to the Health Cloud HealthcareFacility object.
param
fhirObj
is a FHIR Location object.
paramfacilityTypeId
is the Id of the CodeSetBundle to set.
paramparentFacilityId
is a String with the parent HealthcareFacility Id or null if not present.
return A Health Cloud HealthcareFacility object.
fun getLocationHealthcareFacility (fhirObj, facilityTypeId, upsertLookupResponse, create)
Converts the provided Location FHIR object to the Health Cloud HealthcareFacility object.
param
fhirObj
is a FHIR Location object.
paramfacilityTypeId
is the Id of the CodeSetBundle to set.
paramcreate
is a boolean with true to create and false to update.
paramupsertLookupResponse
is lookup of FHIR CodeSets object.
return A Health Cloud HealthcareFacility object.
fun getLocationIdentifier (fhirObj, idTypeIdList)
Converts the provided Location FHIR object to the Health Cloud Identifier object.
param
fhirObj
is a FHIR Location object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes. from Health Cloud map.
return A Health Cloud Identifier object.
fun getLocationIdentifier (fhirObj, idTypeIdList, healthcareFacilityId)
Converts the provided Location FHIR object to the Health Cloud Identifier object.
param
fhirObj
is a FHIR Location object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramhealthcareFacilityId
is the HealthcareFacility Id to use as the parent record Id.
return A Health Cloud Identifier object.
fun getLocationContactPoint (telecom)
Converts the provided Location FHIR object to the Health Cloud ContactPoint object list.
param
telecom
is a list of Location telecom objects.
return A Health Cloud ContactPoint object list.
fun getLocationContactPoint (telecom, accountId)
Converts the provided Location FHIR object to the Health Cloud ContactPoint object list.
param
telecom
is a list of Location telecom objects.
paramaccountId
is a String with the Account Id.
return A Health Cloud ContactPoint object list.
fun getLocationContactPointAddress (fhirObj)
Converts the provided Location FHIR object to the Health Cloud ContactPoint Address object .
param
fhirObj
is a FHIR Location object.
return A Health Cloud ContactPoint Address object.
fun getLocationContactPointAddress (fhirObj, accountId)
Converts the provided Location FHIR object to the Health Cloud ContactPoint Address object .
param
fhirObj
is a FHIR Location object.
paramaccountId
is a String with the Account Id.
return A Health Cloud ContactPoint Address object.
fun getLocationAccountAccountRelation (fhirObj, relationRoleMap)
Converts the provided Location FHIR object to the Health Cloud AccountAccountRelation object .
param
fhirObj
is a FHIR Location object.
paramrelationRoleMap
the role relationship map.
return A Health Cloud ContactPoint AccountAccountRelation object.
fun getLocationAccountAccountRelation (fhirObj, relationRoleMap, accountId)
Converts the provided Location FHIR object to the Health Cloud AccountAccountRelation object .
param
fhirObj
is a FHIR Location object.
paramrelationRoleMap
the role relationship map.
paramaccountId
is a String with the Account Id.
return A Health Cloud ContactPoint AccountAccountRelation object.
fun getLocationOperatingHours (availableTime)
Converts the provided availableTime object to the Health Cloud Available Time Description Text.
param
at
is a FHIR PractitionerRole availableTime object.
return A Health Cloud Available Time Description Text.
PractitionerFHIRTools
PractitionerFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Practitioner/PractitionerFHIRTools.dwl
Functions
fun getPractitionerResponse (acc: Object, idTypeIdList, personNames, personLanguages, fhirCodeSetQualification, qualificationIdentifiers, healthCareProviderIdentifiers, id)
Generates the FHIR response with the provided Account and contact Accounts.
param
acc
is the Account object to map.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
parampersonNames
is an optional array of HC PersonName objects to map.
parampersonLanguages
is a list of HC language to map.
paramfhirCodeSetQualification
is a list of Qualification CodeSet to map.
paramqualificationIdentifiers
is Qualification object with identifiers.
return A FHIR formatted Practitioner object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Account | Id | Patient account Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
active | Account | IsActive | Whether this patient's record is in active use |
name.family | PersonName | LastName | Partitioner last name |
name.given | PersonName | FirstName | Partitioner first name |
name.prefix | PersonName | Prefix | Parts that come after the name |
name.suffix | PersonName | Suffix | Parts that come before the name |
active | Account | IsActive | Whether this Patitioner's record is in active use |
telecom.system | ContactPointPhone\ContactPointEmails | email\phone | Constant value email or phone |
telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
gender | Contact | Gender | The gender of the partitioner |
birthDate | Contact | Birthdate | The date of birth of the partitioner |
communication.coding.display | PersonLanguage | Name | A language the practitioner can use in patient communication |
communication.text | PersonLanguage | Language | A language the practitioner can use in patient communication |
qualification.code.coding.code | BoardCertification | CertificationType | Coded representation of the qualification |
qualification.period.start | BoardCertification | EffectiveFrom | Start date of the period during which the qualification is valid |
qualification.period.end | BoardCertification | EffectiveTo | End date of the period during which the qualification is valid |
qualification.issuer | BoardCertification | BoardName | An identifier for this qualification for the practitioner |
fun getQualifications (boardCertifications, fhirCodeSetQualification, qualificationIdentifiers)
Gets the Qualifications with the provided list of Boar certifications
param
boardCertifications
is a list of HC boardCertifications to map.
paramfhirCodeSetQualification
is a list of Qualification CodeSet to map.
paramqualificationIdentifiers
is Qualification object with identifiers.
return a list of Qualifications in FHIR format.
fun getCommunicationLangugaes (personLanguages)
Gets the communication languages with the provided list of person languages.
param
personLanguages
is a list of HC language to map.
return a list of communication languages in FHIR format.
fun getPractitionerNames (personNames)
Gets the Practitioner names in FHIR format with the provided list of HC PersonName objects.
param
personNames
is a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getPractitionerCommunicationContactPoints (cp)
Gets the Practitioner communication contact point object for the provided contact point provided.
param
cp
is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getPractitionerIdentifiers (idTypeMap, ids)
Gets the Practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeMap
is a map of HC Ids to FHIR identifier codes.
paramids
is an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getPractitionerAddresses (addresses)
Get the Practitioner addresses form HC and returns an array of FHIR formatted Address objects.
param
addresses
is an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getPractitionerContacts (contactAccounts, contactPersonNames)
Gets the Practitioner contact-contact relations as an array of FHIR objects.
param
contactAccounts
is an optional list of contact Account objects to map.
paramcontactPersonNames
is a list of contact PersonName objects.
return An array of contact FHIR objects.
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
obj
is an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arr
is an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arr
is an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
obj
is an object.
return An object with null values removed.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
fun getPractitionerIdentifier (identifiers, idTypeIdList)
Gets the practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
identifiers
is an array of HC identifier objects.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return An array of FHIR Identifier objects.
PractitionerRequest
This module defines functions needed to convert a
FHIR Practitioner resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Practitioner/PractitionerRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getPractitionerAccount (fhirObj, recordTypeId)
Converts the provided Practitioner FHIR object to the Health Cloud Account object.
param
fhirObj
is a FHIR Practitioner object.
paramrecordTypeId
is a String with the record type Id to use.
return A Health Cloud Account object.
fun getBoardCertificationIdentifier (method, index, accountId, qualification, idTypeIdList)
Converts the provided Practitioner FHIR Qualification object to the Health Cloud Identifier object.
param
method
is a string with the method value.
paramindex
is a index value of the BoardCertification loop.
paramaccountId
is a string with the Account Id.
paramqualification
is a FHIR qualification object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getPractitionerIdentifier (method, healthcareProviderId, identifierObj, idTypeIdList)
Converts the provided Practitioner FHIR object to the Health Cloud Identifier object.
param
method
is a string with the method value.
paramaccountId
is a string with the Account Id.
paramidentifierObj
is a FHIR Practitioner identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getPractitionerContact (fhirObj)
Converts the provided Practitioner FHIR object to the Health Cloud Contact object.
param
fhirObj
is a FHIR Practitioner object.
return A Health Cloud Contact object.
fun getPractitionerPersonName (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud PersonName object list.
param
fhirObj
is a FHIR Practitioner object.
paramaccountId
is a string with the Account Id.
return A Health Cloud PersonName object list.
fun getPractitionerContactPoint (telecom, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud ContactPoint object list.
param
telecom
is a list of Practitioner telecom objects.
paramaccountId
is a string with the Account Id.
return A Health Cloud ContactPoint object list.
fun getPractitionerContactPointAddress (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud ContactPoint Address object list .
param
fhirObj
is a FHIR Practitioner object.
paramaccountId
is a string with the Account Id.
return A Health Cloud ContactPoint Address object list.
fun getPractitionerPersonLanguage (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObj
is a FHIR Practitioner object.
paramaccountId
is a string with the Account Id.
return A Health Cloud PersonLanguage object list.
fun getPractitionerContact (fhirObj)
Converts the provided Practitioner FHIR object to the Health Cloud Contact object.
param
fhirObj
is a FHIR Practitioner object.
return A Health Cloud Contact object.
fun formatName (obj)
Gets the trimmed concatenated name with the provided name object.
param
obj
is the name object to format.
return A formatted name string with 'First Last'.
fun getPractitionerHealthcareProvider (fhirObj, contactResp)
Converts the provided Practitioner FHIR object to the Health Cloud HealthcareProvider object.
param
fhirObj
is a FHIR Practitioner object.
paramcontactResp
is contactResponse Object in the previous flows
return A Health Cloud HealthcareProvider object.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field.
paramlookupReq
is from FHIR_CodeSet__c.
return A value for the picklist field.
fun getBoardCertification (fhirObj, contactResp, upsertLookupResponse, healthcareProviderId)
Converts the provided Practitioner FHIR object to the Health Cloud BoardCertification object.
param
fhirObj
is a FHIR Practitioner object.
paramcontactResp
is contactResponse Object in the previous flows
paramupsertLookupResponse
is FHIR Codeset lookup Object
return A Health Cloud BoardCertification object.
OrganizationFHIRTools
OrganizationFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Organization/OrganizationFHIRTools.dwl
Functions
fun getOrganizationResponse (org: Object, idTypeIdList, accountContactRelations, contactAccountIds, contactAccounts, codeSetLU)
Gets the organization response object with the provided Organization object.
param
org
is a Health Cloud Organization object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramcontactAccounts
is a list of Contact accounts.
paramcontactPersonNames
is a list of contact PersonName objects.
return A FHIR formatted Organization object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Account | Id | Account Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
active | Account | IsActive | Whether the organization's record is still in active use |
type.coding.display | Account | Type | Kind of organization |
name | Account | Name | Name used for the organization |
telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
address.use | ContactPointAddresses | UsageType | The use of an address |
address.type | ContactPointAddresses | AddressType | The type of an address (physical\postal) |
address.line | ContactPointAddresses | Street | Patient's address Line |
address.city | ContactPointAddresses | City | Patient's address city |
address.state | ContactPointAddresses | State | Patient's address state |
address.postalCode | ContactPointAddresses | PostalCode | Patient's address postal code |
address.country | ContactPointAddresses | Country | Patient's address country |
contact.purpose.coding.display | AccountContactRelation | Roles | The type of contact |
contact.name.family | PersonName | LastName | The last name of the contact party |
contact.name.given | PersonName | FirstName | The first name of the contact party for the patient |
contact.name.suffix | PersonName | Suffix | Parts that come after the contact party's name |
contact.name.prefix | PersonName | Prefix | Parts that come before the contact party's name |
contact.name.use | PersonName | NameUsageType | Purpose of this address |
fun getCodingValue (req, lookupReq)
Gets the Coding for CodeableConcept in FHIR format with the provided list of HC request field and Lookup value from FHIRCodeSet\_c.
param
req
is HC field.
return A list of FHIR formatted coding for CodeableConcept objects.
fun getOrgContactsNames (personNames)
Gets the Organization Contacts names in FHIR format with the provided list of HC PersonName objects.
param
personNames
is a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getOrgContactsPurpose (accountContactRelation, codeSetLU)
Gets the Organization Account Contact Relation Roles in FHIR format with the provided list of AccountContactRelation object and lookup values.
param
accountContactRelation
is a list of HC AccountContactRelation objects.
return A list of FHIR formatted purpose codeable concept.
fun getOrgIdentifiers (identifiers, idTypeIdList)
Gets the organization identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
identifier
is an array of HC identifier objects.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return An array of FHIR Identifier objects.
fun getOrgCommunicationContactPoints (contactPoints)
Gets the Organization communication contact point object for the provided contact point provided.
param
contactPoints
is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getOrgContactPointAddresses (addresses)
Get the Organization addresses form HC and returns an array of FHIR formatted Address objects.
param
addresses
is an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getOrgContacts (accountContactRelations, contactAccountIds, contactAccounts, codeSetLU)
Gets the organization account-contact relations as an array of FHIR objects.
param
contactAccounts
is an optional list of contact Account objects to map.
paramcontactPersonNames
is a list of contact PersonName objects.
return An array of contact FHIR objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
OrganizationRequest
This module defines functions needed to convert a
FHIR Organization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Organization/OrganizationRequest.dwl
Functions
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field.
paramlookupReq
is from FHIR_CodeSet__c.
return A value for the picklist field.
fun getOrganizationAccount (fhirObj, codeSetLU)
Converts the provided Organization FHIR object to the Health Cloud Account object.
param
fhirObj
is a FHIR Organization object.
return A Health Cloud Account object.
fun getOrganizationIdentifier (method, identifierObj, idTypeIdList)
Converts the provided Organization FHIR object to the Health Cloud Identifier object.
param
method
is a String with the HTTP method to use.
paramidentifierObj
is a FHIR Organization identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getOrganizationIdentifier (method, identifierObj, idTypeIdList, accountId)
Converts the provided Organization FHIR object to the Health Cloud Identifier object.
param
method
is a String with the HTTP method to use.
paramidentifierObj
is a FHIR Organization identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramaccountId
is a String with the Account Id to use.
return A Health Cloud Identifier object.
fun getOrganizationContactPointAddress (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint Address object list.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR Organization object.
return A Health Cloud ContactPoint Address object list.
fun getOrganizationContactPointAddress (method, fhirObj, accountId)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint Address object list.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR Organization object.
paramaccountId
is a String with the Account Id to use.
return A Health Cloud ContactPoint Address object list.
fun getOrganizationContact (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint object list.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR Organization object.
return A Health Cloud ContactPoint object list.
fun getOrganizationContact (method, fhirObj, accountId)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint object list.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR Organization object.
paramaccountId
is a String with the Account Id to use.
return A Health Cloud ContactPoint object list.
fun getOrganizationContactAccount (method, contactObj, recordType)
Converts the provided Organization FHIR object to the Health Cloud Contact object.
param
method
is a String with the HTTP method to use.
paramcontactObj
is a FHIR Organization contact object.
paramrecordType
is a person account type.
return A Health Cloud Contact object.
fun getContactsPersonName (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud PersonName object list.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR Organization contact object.
return A Health Cloud PersonName object list.
fun getContactsContactPointAddress (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint Address object list.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR Organization object.
return A Health Cloud ContactPoint Address object list.
fun getContactsContact (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint object list.
param
method
is a String with the HTTP method to use.
paramtelecom
is a list of Organization contacts telecom objects.
return A Health Cloud ContactPoint object list.
fun getAccountContactRelation (method, accountId, contactsDetails, fhirObj, codeSetLU)
Converts the provided Organization FHIR object to the Health Cloud AccountContact Relation object list.
param
method
is a String with the HTTP method to use.
paramaccountId
is Organization account Id.
paramcontactIds
is organization contacts contact Ids.
return A Health Cloud ContactPoint object list.
encounterfhirtools
encounterFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Encounter/encounterfhirtools.dwl
Functions
fun getEncounterResponse (encounterRLU)
Generates the FHIR response with the provided Encounter Object.
param
encounterRLU
is the Encounter object to map.
return A Health Cloud ClientEncounter response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | ClinicalEncounter | Id | Encounter Id |
Identifier.use | ClinicalEncounterIdentifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | ClinicalEncounterIdentifier | SourceSystem | Identifier system for resource |
identifier.value | ClinicalEncounterIdentifier | IdValue | Identifier value for resource |
identifier.type.coding.code | ClinicalEncounterIdentifier | IdTypeId | Description of identifier |
status | ClinicalEncounter | Status | Encounter status |
serviceType.coding.display | ClinicalEncounter | ServiceType | Specific type of service |
class.coding.display | ClinicalEncounter | Category | Classification of patient encounter |
type.coding.code | ClinicalEncounter.TypeId | Code | Symbol in syntax defined by the system for Encounter type |
type.coding.display | ClinicalEncounter.TypeId | CodeDescription | Representation defined by the system |
type.coding.system | ClinicalEncounter.TypeId | SourceSystem | Identity of the terminology system for Encounter type |
priority.coding.code | ClinicalEncounter.PriorityId | Code | Symbol in syntax defined by the system for Encounter urgency |
priority.coding.display | ClinicalEncounter.PriorityId | CodeDescription | Representation defined by the system |
priority.coding.system | ClinicalEncounter.PriorityId | SourceSystem | Identity of the terminology system for Encounter urgency |
subject | ClinicalEncounter | PatientId | The patient\group present at the encounter |
basedOn | ClinicalEncounterSvcRequest | ClinicalServiceRequestId | The ServiceRequest that initiated this encounter |
participant | ClinicalEncounterProvider | Not Available | List of participants involved in the encounter |
participant.type | ClinicalEncounterProvider | PractitionerTypeId | Role of participant in encounter |
participant.period.start | ClinicalEncounterProvider | StartDate | Start time for the encounter that the participant participated |
participant.period.end | ClinicalEncounterProvider | EndDate | End time for the encounter that the participant participated |
period.start | ClinicalEncounter | StartDate | Start time of the encounter |
period.end | ClinicalEncounter | EndDate | End time of the encounter |
length.value | ClinicalEncounter | Duration | Quantity of time the encounter lasted |
length.unit | ClinicalEncounter | DurationUnit | Unit for the quantity of time the encounter lasted |
reasonCode.coding.code | ClinicalEncounterReason.ReasonCodeId | Code | Symbol for coded reason the encounter takes place |
reasonCode.coding.display | ClinicalEncounterReason.ReasonCodeId | CodeDescription | Representation defined by the system |
reasonCode.coding.system | ClinicalEncounterReason.ReasonCodeId | SourceSystem | Identity of the terminology system for Reason |
reasonReference | ClinicalEncounterReason | ReasonReferenceId | Reason the encounter takes place (reference) |
serviceProvider | ClinicalEncounter | FacilityId | The organization (facility) responsible for this encounter |
partOf | ClinicalEncounter | RelatedClinicalEncounterId | Another Encounter this encounter is part of |
diagnosis.condition | ClinicalEncounterDiagnosis | DiagnosisId | The diagnosis or procedure relevant to the encounter |
diagnosis.use | ClinicalEncounterDiagnosis | UsageTypeId | Role that this diagnosis has within the encounter |
diagnosis.rank | ClinicalEncounterDiagnosis | DiagnosisRank | Ranking of the diagnosis |
hospitalization.preAdmissionIdentifier | ClinicalEncounter | PreAdmissionIdentiferId | Pre-admission identifier |
hospitalization.origin | ClinicalEncounter | PreviousFacilityId | The location or organization from which the patient came before admission |
hospitalization.admitSource | ClinicalEncounter | AdmissionSource | From where patient was admitted |
hospitalization.reAdmission | ClinicalEncounter | ReadmissionCode | The type of hospital re-admission that has occurred |
hospitalization.dietPreference | ClinicalEncounter | DietPreference | Diet preferences reported by the patient |
hospitalization.specialCourtesy | ClinicalEncounter | SpecialCourtesy | Special courtesies |
hospitalization.destination | ClinicalEncounter | DestinationFacility\DestinationOrganization | Location\org to which the patient is discharged |
hospitalization.dischargeDisposition | ClinicalEncounter | DischargeDisposition | Category or kind of location after discharge |
location.location | ClinicalEncounterFacility | FacilityId | Location the encounter takes place |
location.status | ClinicalEncounterFacility | Status | The status of the location. |
location.physicalType | ClinicalEncounterFacility | FacilityTypeId | The physical type of the location |
location.period.start | ClinicalEncounterFacility | StartDate | Start time during which the patient was present at the location |
location.period.end | ClinicalEncounterFacility | EndDate | End time during which the patient was present at the location |
fun getDiagnosis (encounter)
Creates a list of Diagnosis references with the provided Encounter object.
param
encounter
is the Encounter object containing Diagnosis.
return A list of Diagnosis references.
fun getLocation (encounter)
Creates a list of location references with the provided Encounter object.
param
encounter
is the Encounter object containing locations.
return A list of location references.
fun getParticipant (participant)
Gets the Participant in FHIR format with the provided ClinicalEncounterProvider objects.
param
participant
is a list of HC ClinicalEncounterProvider objects.
return A list of FHIR formatted participant response.
fun getReasonCode (ReasonCodeIdCodeSetBundle)
Gets the reasonCode in FHIR format with the provided ClinicalEncounterReason objects.
param
ReasonCodeIdCodeSetBundle
is a list of HC CodeSetBundle objects related to reasonCode.
return A list of FHIR formatted reasonCode response.
fun getHospitalization (encounter)
Gets the hospitalization related data in FHIR format with the provided encounter objects.
param
encounter
is the ClinicalEncounterReason object.
return A list of FHIR formatted hospitalization response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
encounterRequest
This module defines functions needed to convert a
FHIR Encounter resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Encounter/encounterRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field.
paramlookupReq
is from FHIR_CodeSet__c.
return A value for the picklist field.
fun getEncounterUpsert (fhirObj, codeSetBundleList, create)
Converts the provided Encounter FHIR object to the Health Cloud Encounter object.
param
fhirObj
is a FHIR Encounter object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Encounter object
paramcreate
is a boolean with true for a create and false for an update.
return Health Cloud Encounter upsert fields.
fun getEncounterUpdate (fhirObj, codeSetBundleList, create)
Converts the provided Encounter FHIR object to the Health Cloud Encounter object.
param
fhirObj
is a FHIR Encounter object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Encounter object
paramcreate
is a boolean with true for a create and false for an update.
return Health Cloud Encounter update fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided Encounter FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Encounter FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, encounterId, typeId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterIdentifier object.
param
identifier
is the list of ClinicalEncounterIdentifier object.
paramencounterId
is the associated encounter Id.
paramtypeId
is a String with the Id type Id to set.
return Health Cloud ClinicalEncounterIdentifier upsert fields.
fun getEncounterPreAdmissionUpsert (preAdmissionId)
Adds the Encounter PreAdmissionIdentifier to the Health Cloud ClinicalEncounter object.
param
preAdmissionId
is the PreAdmissionIdentifier Id.
return Health Cloud ClinicalEncounter upsert fields.
fun getParticipantUpsert (participant, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterProvider object.
param
participant
is the list of ClinicalEncounterProvider object.
paramencounterId
is the associated encounter Id.
return Health Cloud ClinicalEncounterProvider upsert fields.
fun getLocationUpsert (location, encounterId, typeId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterFacility object.
param
location
is the list of ClinicalEncounterFacility object.
paramencounterId
is the associated encounter Id.
return Health Cloud ClinicalEncounterFacility upsert fields.
fun getReasonCodeUpsert (reasonCode, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterReason object.
param
reasonCode
is the list of ClinicalEncounterReason object.
paramencounterId
is the associated encounter Id.
return Health Cloud ClinicalEncounterReason upsert fields.
fun getDiagnosisUpsert (diagnosis, encounterId, useCodeId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterDiagnosis object.
param
diagnosis
is the list of ClinicalEncounterDiagnosis object.
paramencounterId
is the associated encounter Id.
return Health Cloud ClinicalEncounterDiagnosis upsert fields.
fun getEncounterSvcRequestUpsert (svcRequest, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterSvcRequest object.
param
svcRequest
is the reference to ClinicalServiceRequest that this encounter is based on.
paramencounterId
is the associated encounter Id.
return Health Cloud ClinicalEncounterSvcRequest upsert fields.
fun getEncounterReasonRefUpsert (reasonReference, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterReason object.
param
reasonReference
is the Reason Reference for ClinicalEncounterReason object.
paramencounterId
is the associated encounter Id.
return Health Cloud ClinicalEncounterReason upsert fields.
PractitionerRoleFHIRTools
PractitionerRoleFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/PractitionerRole/PractitionerRoleFHIRTools.dwl
Functions
fun getPractitionerRoleResponse (prole: Object, careProviderFacilitySpecialty, fhirCodeSetCode, practitioner, specialty, location, idTypeIdList, operatingHours, organization)
Generates the practitionerrole response object in FHIR format with the provided practitionerrole object queried from Health Cloud.
param
prole
is the PractitionerRole object to map.
paramcareProviderFacilitySpecialty
is the care provider
paramfhirCodeSetCode
is a CodeSet Lookup for code object inside the careProviderFacilitySpecialty table to map. facility specialty.
parampractitioner
is a Practitioner object to map.
paramspecialty
is a Specialty object to map.
paramlocation
is a Location object to map.
paramidTypeMap
is a map with the Id type Ids to use.
paramoperatingHours
is a OperatingHours object to map.
paramorganization
is a Organization object to map.
return A FHIR formatted PractitionerRole object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Account | Id | Patient account Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
active | Account | IsActive | Whether this patient's record is in active use |
.start | HealthcarePractitionerFacility | EffectiveFrom | The start date of the during which the practitioner is authorized to perform in these role(s) |
.end | HealthcarePractitionerFacility | EffectiveTo | The end date of the during which the practitioner is authorized to perform in these role(s) |
practitioner.reference | HealthcarePractitionerFacility | PractitionerId | Practitioner that is able to provide the defined services for the organization |
practitioner.display | HealthcarePractitionerFacility | Name | Practitioner that is able to provide the defined services for the organization |
code.coding.code | CareProviderFacilitySpecialty | SpecialtyRole | Roles which this practitioner may perform |
code.coding.display | CareProviderFacilitySpecialty | Name | Roles which this practitioner may perform |
specialty.coding.code | CareProviderFacilitySpecialty | SepcialtyId | Specific specialty of the practitioner |
specialty.coding.code | CareProviderFacilitySpecialty | CareSpecialty.Name | Specific specialty of the practitioner |
location.reference | HealthcarePractitionerFacility | HealthcareFacilityId | Organization where the roles are available. |
location.display | HealthcarePractitionerFacility | HealthcareFacility.Name | Organization where the roles are available. |
organization (Reference) | Organization where the roles are available. | ||
availabilityExceptions | HealthcarePractitionerFacility | AvailabilityExceptions | Description of availability exceptions |
availableTime | OperatingHoursId | OperatingHours | Times the Service Site is available |
fun getIdentifier (prole, idTypeIdList)
Gets the practitionerrole identifiers and returns a list of FHIR Identifier objects.
param
prole
an array of HC Identifier objects.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return An array of FHIR Identifier objects.
fun getPractitioner (prole: Object, practitioner)
Gets the practitioner object with the provided practitionerrole object and returns null if not found.
param
prole
is the PractitionerRole object to map.
parampractitioner
is a Practitioner object.
return A FHIR formatted Practitioner object.
fun getLocation (prole: Object, location)
Gets the location object with the provided practitionerrole object and returns null if not found.
param
prole
is the PractitionerRole object to map.
paramlocation
is an array of HC Location objects.
return An array of FHIR formatted Location objects.
fun getOrganization (prole: Object, organization)
Gets the organization object with the provided practitionerrole object and returns null if not found.
param
prole
is the PractitionerRole object to map.
paramorganization
is an array of HC Organization objects.
return An array of FHIR formatted Organization objects.
fun getCode (careProviderFacilitySpecialty, fhirCodeSetCode)
Gets the code object with the provided practitionerrole object and returns null if not found.
param
careProviderFacilitySpecialty
is an array of HC Code objects.
paramfhirCodeSetCode
is a list of codeset lookup for Code to map.
return An array of FHIR formatted Code objects.
fun getspecialty (specialty)
Gets the specialty object with the provided practitionerrole object and returns null if not found.
param
specialty
is an array of HC Specialty objects.
return An array of FHIR formatted Specialty objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
PractitionerRoleRequest
This module defines functions needed to convert a
FHIR PractitionerRole resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/PractitionerRole/PractitionerRoleRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field.
paramlookupReq
is from FHIR_CodeSet__c.
return A value for the picklist field.
fun getPractitionerRoleAccount (fhirObj, operatingHoursId)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
fhirObj
is a FHIR PractitionerRole healthcarePractitionerFacility object.
return A Health Cloud HealthcarePractitionerFacility object.
fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdList)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR PractitionerRole identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdList, healthcareFacilityId)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
method
is a String with the HTTP method to use.
paramfhirObj
is a FHIR PractitionerRole identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramhealthcareFacilityId
is a String with the HealthcareFacility Id.
return An object with a list of Health Cloud Identifier objects.
fun getCareProviderFacilitySpecialty (method, fhirObj, upsertLookupResponse)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
fhirObj
is a FHIR PractitionerRole careProviderFacilitySpecialty object.
return A Health Cloud CareProviderFacilitySpecialty object.
fun getCareProviderFacilitySpecialty (method, fhirObj, upsertLookupResponse, healthcareFacilityId)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
method
is a String with the method to use.
paramfhirObj
is a FHIR PractitionerRole careProviderFacilitySpecialty object.
paramupsertLookupResponse
is a FHIRCodeSet\_c object.
paramhealthcareFacilityId
is a String with the HealthcareFacility Id.
return An object with a list of Health Cloud CareProviderFacilitySpecialty objects.
fun getAvilableTime (availableTime)
Converts the provided availableTime object to the Health Cloud Available Time Description Text.
param
availableTime
is a FHIR PractitionerRole availableTime object.
return A Health Cloud Available Time Description Text.
fun getHealthcareFacility (method, fhirObj)
Converts the provided PractitionerRole FHIR object to the Health Cloud HealthcareFacility object.
param
method
is a String with the method to use.
paramfhirObj
is a FHIR PractitionerRole object.
return An object with a list of Health Cloud HealthcareFacility objects.
RelatedPersonFHIRTools
RelatedPersonFHIRTools dataweave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/relatedperson/RelatedPersonFHIRTools.dwl
Functions
fun getRelatedPersonResponse (acc: Object, contactAccountIds, contactContactRelations, relationRoleMap, upsertLookupResponse, idTypeIdList)
Generates the FHIR response with the provided Account and contact Accounts.
param
acc
is the Account object to map.
parampersonNames
is an optional array of HC PersonName objects to map.
parampersonLanguages
is a list of person languages to map.
paramcontactAccountIds
is a list of contact account Ids to use a references.
paramcontactContactRelations
is a list of contact relations to map.
paramrelationRoleMap
is a map of relation roles to use.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A FHIR formatted RelatedPerson object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Account | Id | RelatedOerson account Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
active | Account | IsActive | Whether this related person's record is in active use |
patient.reference | ContactContactRelation__c | HealthCloudGA__Contact__c | The patient this person is related to |
period.start | ContactContactRelation__c | HealthCloudGA__StartDate__c | Start time that this relationship is considered |
period.end | ContactContactRelation__c | HealthCloudGA__EndDate__c | End time that this relationship is considered valid |
relationship.system | ContactContactRelation__c | Constant relationshipSystem | |
relationship.code | ContactContactRelation__c | HealthCloudGA__Role__c | Lookup using function getRelatedPersonRelationRole |
name.family | PersonName | LastName | RelatedPerson family name |
name.given | PersonName | FirstName | RelatedPerson given name |
name.use | PersonName | NameUsageType | The use of a RelatedPerson name |
name.prefix | PersonName | Prefix | Parts that come before the name |
name.suffix | PersonName | Suffix | Parts that come after the name |
gender | Contact | Gender | The gender of a person used for administrative purposes |
birthDate | Contact | Birthdate | The date on which the related person was born |
telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
address.use | ContactPointAddresses | UsageType | The use of an address |
address.type | ContactPointAddresses | AddressType | The type of an address (physical\postal) |
address.line | ContactPointAddresses | Street | RelatedPerson's Address Line |
address.city | ContactPointAddresses | City | RelatedPerson's Address City |
address.state | ContactPointAddresses | State | RelatedPerson's Address State |
address.postalCode | ContactPointAddresses | PostalCode | RelatedPerson's Address Postal Code |
address.country | ContactPointAddresses | Country | RelatedPerson's Address Country |
communication.language.coding.code | PersonLanguage | System__c | Language terminology system |
communication.language.coding.code | PersonLanguage | Code__c | Language code |
communication.language.coding.code | PersonLanguage | Display__c | Language display |
communication.preferred | PersonLanguage | Rank | Language preference indicator |
fun getRelatedPersonNames (personNames)
Gets the RelatedPerson names in FHIR format with the provided list of HC PersonName objects.
param
personNames
is a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getRelatedPersonCommunicationContactPoints (cp)
Gets the RelatedPerson communication contact point object for the provided contact point provided.
param
cp
is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getRelatedPersonIdentifiers (ids, idTypeIdList)
Gets the RelatedPerson identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeIdList
is a list of HC records to FHIR identifier type codes.
paramids
is an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getRelatedPersonAddresses (addresses)
Get the RelatedPerson addresses form HC and returns an array of FHIR formatted Address objects.
param
addresses
is an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getCommunicationLangugaes (personLanguages, languagelookup)
Maps the communication languages with the provided list of person languages.
param
personLanguages
is a list of languages to map.
paramlanguagelookup
is FHIR Codeset lookup object.
return a FHIR formatted list of communication languages.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
fun getRelatedPersonRelationRole (contactContactRelation, id, relationRoleMap)
Gets the relatedperson relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.
param
contactContactRelations
is a list of contact relation objects.
paramid
is a string with the account Id.
paramrelationRoleMap
the role relationship map.
return A code for the relatedperson relation role.
fun getRelatedPersonRelationRoleRecord (contactContactRelation, id)
Gets the relatedperson relation role record with the provided list of contact relations and the Id.
param
contactContactRelations
is a list of contact relation objects.
paramid
is a string with the account Id.
return A Salesforce role Id for the provided data.
RelatedPersonRequest
This module defines functions needed to convert a
FHIR RelatedPerson resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/relatedperson/RelatedPersonRequest.dwl
Functions
fun getRelatedPersonAccount (fhirObj, recordTypeId)
Converts the provided RelatedPerson FHIR object to the Health Cloud Account object.
param
fhirObj
is a FHIR RelatedPerson object.
paramrecordTypeId
is a String with the record type Id to set.
return A Health Cloud Account object.
fun getRelatedPersonContact (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud Contact object.
param
fhirObj
is a FHIR RelatedPerson object.
return A Health Cloud Contact object.
fun getRelatedPersonPersonName (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonName object list.
param
fhirObj
is a FHIR RelatedPerson object.
return A Health Cloud PersonName object list.
fun getRelatedPersonPersonName (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonName object list.
param
fhirObj
is a FHIR RelatedPerson object.
paramaccountId
is a String with the Account Id.
return A Health Cloud PersonName object list.
fun getRelatedPersonContactPoint (telecom)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint object list.
param
telecom
is a list of RelatedPerson telecom objects.
return A Health Cloud ContactPoint object list.
fun getRelatedPersonContactPoint (telecom, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint object list.
param
telecom
is a list of RelatedPerson telecom objects.
paramaccountId
is a String with the Account Id.
return A Health Cloud ContactPoint object list.
fun getRelatedPersonContactPointAddress (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint Address object list .
param
fhirObj
is a FHIR RelatedPerson object.
return A Health Cloud ContactPoint Address object list.
fun getRelatedPersonContactPointAddress (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint Address object list .
param
fhirObj
is a FHIR RelatedPerson object.
paramaccountId
is a String with the Account Id.
return A Health Cloud ContactPoint Address object list.
fun getRelatedPersonPersonLanguage (fhirObj, upsertLookupResponse)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObj
is a FHIR RelatedPerson object.
return A Health Cloud PersonLanguage object list.
fun getRelatedPersonPersonLanguage (fhirObj, upsertLookupResponse, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObj
is a FHIR RelatedPerson object.
paramupsertLookupResponse
is a FHIR Codeset lookup object.
paramaccountId
is a String with the Account Id.
return A Health Cloud PersonLanguage object list.
fun getRelatedPersonContact (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud Contact object.
param
fhirObj
is a FHIR Patient object.
return A Health Cloud Contact object.
fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdList)
Converts the provided RelatedPerson FHIR object to the Health Cloud Identifier object.
param
method
is a string with the method to use.
paramidentifierObj
is a FHIR Patient identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdList, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud Identifier object.
param
method
is a string with the method to use.
paramidentifierObj
is a FHIR Patient identifier object.
paramidTypeIdList
is a list of HC records to FHIR identifier type codes.
paramaccountId
is a string with the Account Id.
return A Health Cloud Identifier object.
fun getRelatedPersontContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, contactId)
Converts the provided Contact FHIR object to the Health Cloud RelatedPerson contact-to-contact relationship of composite request.
param
method
is a string with POST or PATCH.
paramfhirObj
is a FHIR Contact object.
paramrelationRoleMap
the role relationship map.
parammainContactId
is a string with the main Contact Id.
paramcontactId
is a string with the Contact Id.
return A composite Health Cloud contact-to-contact relationship request.
Util
A library with needed dataweave utility functions.
Source:
.src/main/resources/dwl/Util.dwl
Functions
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
obj
is an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arr
is an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arr
is an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
obj
is an object.
return An object with null values removed.
fun getDateOfWeek (dateOfWeek)
Converts the DateOfWeek code to DateOfWeek.
param
dateOfWeekCode
is an code.
return An object with null values removed.